<!doctype html>

<head>
    <!-- meta -->
    <meta charset="utf-8">
    <meta name="description" content="Flat, Clean, Responsive, admin template built with bootstrap 3">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
    <!-- /meta -->

    <title>心秘籍系统</title>


    <bstablecss />
    <commonheader />
</head>
<body>

<div class="app">
    <section class="layout">

        <div class="panel panel-primary">
            <div class="panel-heading">
                用户组织
            </div>

            <div class="panel-body">
                <div class="row">

                    <div class="col-md-3">
                        <div class="row">
                            <div class="col-lg-12">
                                <form role="form" class="form-horizontal parsley-form" data-parsley-validate="" novalidate="">

                                    <div class="form-group">
                                        <label class="col-sm-4 control-label">团体名称</label>
                                        <div class="col-sm-8">
                                            <input type="text" class="form-control" placeholder="输入团队名称" id="org-name" value="" disabled>
                                        </div>
                                    </div>
                                </form>
                            </div>

                            <div class="col-lg-12">

                                <div class="cf nestable-lists">
                                    <div class="dd" id="nestable">

                                        <div class="edit-area">
                                            <input type="text" class="form-control addclass"  placeholder="输入级别名称（如班级，部门名）" id="class-inputval"   /><a class="btn btn-primary btn-sm btn-parsley" id="submit-class" style="margin-top: 10px;">添加一级子级</a>
                                        </div>
                                    </div>


                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="col-md-9">
                        <div class="row">
                            <div class="col-lg-12">

                                <a class="btn btn-success" id="save-classinfo">保存组织信息</a>
                                <a class="btn btn-success" id="edit-classinfo">编辑组织信息</a>

                                <pre id="nestable-output" style="display: none;"></pre>

                                </a>


                                <div class="col-xs-12" >
                                    <section class="panel">
                                        <div class="panel-heading">用户列表</div>
                                        <div class="panel-body no-padding">

                                            <div id="toolbar"></div>

                                            <table class="table table-striped no-margin table-bordered" id="user-list-table">

                                            </table>
                                        </div>
                                        <div class="panel-footer">
                                            <div>
                                                <a class="btn btn-success" id="add-user-btn">添加用户</a>
                                                <div class="btn-group ">
                                                    <button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown">从xls工作簿导入用户
                                                        <span class="caret"></span>
                                                    </button>
                                                    <ul class="dropdown-menu" >
                                                        <li>
                                                            <a href="#">导入当前选择分组的用户</a>
                                                        </li>
                                                        <li>
                                                            <a href="#" id="import-xls-all-btn">导入多个分组的用户</a>
                                                        </li>
                                                        <li>
                                                            <a href="/d/importUsers_example.xls">下载多分组用户导入示例文件</a>
                                                        </li>
                                                    </ul>
                                                </div>
                                                <a class="btn btn-danger" id="delete-user">批量删除用户</a>

                                            </div>

                                            <form id= "uploadForm"   >
                                                <input type="file" id="xls-upload-all" style="display:none;">
                                            </form>

                                            <!--<input type="file" id="xls-upload" style="display: none;">-->


                                        </div>
                                    </section>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </section>

</div>



<!-- 添加用户对话框 -->
<div class="modal fade" id="add-user" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-keyboard="false">
    <div class="modal-dialog" >
        <div class="modal-content">
            <div class="modal-header">
                添加用户<a id="add-user-classinfo" style="display: none;">all</a>
            </div>
            <div class="modal-body" >
                <div class="row">
                    <div class="col-md-12">
                        <div class="panel-body">
                            <form role="form">
                                <div class="form-group">
                                    <table class="table">
                                        <thead>
                                        <tr>
                                            <td>用户名</td>
                                            <td>密码</td>
                                            <td>邮箱</td>
                                            <td>年龄</td>
                                            <td>性别</td>
                                        </tr>
                                        </thead>
                                        <tbody id="add-user-tbody">
                                        <tr>
                                            <td><input class="form-control" type="text" id="add-username" /></td>
                                            <td><input class="form-control" type="text" id="add-userpasswd"/></td>
                                            <td><input class="form-control" type="email" id="add-useremail"/></td>
                                            <td ><input class="form-control" type="number" id="add-userage"/></td>
                                            <td><input type="radio" name="sex" value="男" class="add-usersex" checked>男
                                                <input type="radio" name="sex" value="女" class="add-usersex">女</td>

                                            <td><a class="btn btn-success" id="add-user-newrow">添加一行</a></td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>

            </div>
            <div class="modal-footer" >
                <a class="btn btn-success" id="add-user-save">保存</a>


            </div>
        </div>

    </div>
</div>


<!-- 编辑用户信息对话框 -->
<div class="modal fade" id="edit-user" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-keyboard="false">
    <div class="modal-dialog" >
        <div class="modal-content">
            <div class="modal-header">
                编辑用户<a id="edit-uid" style="display: none;"></a>
            </div>
            <div class="modal-body" >
                <div class="row">
                    <div class="col-md-12">
                        <div class="panel-body">
                            <form role="form">
                                <div class="form-group">
                                    <label for="edit-username">修改用户名</label>
                                    <input type="text" class="form-control" placeholder="修改用户名" id="edit-username">
                                    <label for="edit-useremail">修改邮箱</label>
                                    <input type="email" class="form-control" placeholder="修改用户名" id="edit-useremail">
                                    <label for="edit-userpassword">重置密码</label>
                                    <input type="email" class="form-control" placeholder="修改用户名" id="edit-userpassword">
                                </div>
                            </form>
                        </div>
                    </div>
                </div>

            </div>
            <div class="modal-footer" >
                <a class="btn btn-success" id="edit-user-save">保存</a>

                <a id="row_username" style="display: none;"></a>
                <a id="row_useremail" style="display: none;"></a>

            </div>
        </div>

    </div>
</div>



<commonfooter />
<bstablejs />
<jqnestablejs />

<script src="__PUBLIC__/js/tableTools.js"></script>
<script src="__PUBLIC__/js/orgnizerUserClass.js"></script>

<script>
    $(document).ready(function(){
        orgnizerUserData("/TestAdmin");

    });
</script>

